package extras.salvation.api.methods;

import java.awt.Point;

import com.rsbuddy.script.methods.Mouse;

/**
 * @author Salvation
 * @version 1.0
 * @since 20-08-2011
 */
public class ExtendedMouse {

	/**
	 * @author Salvation
	 * A faster version of com.rsbuddy.script.methods.Mouse.click(true).
	 */
	public static void click() {
		Mouse.press();
		Mouse.release();
	}

	/**
	 * @author Salvation
	 * @param p The Point to click at.
	 * @param hop <tt>true</tt> if the mouse should hop to p, <tt>false</tt> otherwise.
	 * A faster version of com.rsbuddy.script.methods.Mouse.click(true, p).
	 */
	public static void click(final Point p, final boolean hop) {
		if (hop) Mouse.hop(p);
		else Mouse.move(p);
		click();
	}
	
}